﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>${setting.siteName} - 新增医生坐班表</title>
    <meta name="keywords" content="${setting.siteName}">
  	<meta name="description" content="${setting.siteName}">
  	<!-- BEGIN HEADER -->
		[#include "/admin/include/style.ftl"]
	<!-- END HEADER -->
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                    	 <h5>新增医生坐班表</h5>
                    	 <div class="ibox-tools">
                    	 	<button type="button" class="btn btn-outline btn-white btn-xs" id="btn-return-loippi"
                    	 	onclick="location.href='${base}/admin/doctor_work/list.jhtml'"><i class="fa fa-reply-all"></i> 返回列表</button>
                        </div>
                    </div>
                  	<div class="ibox-content">
                  		<form id="inputForm" class="form-horizontal" action="save.jhtml" method="post">

                          <div class="form-group">
                       		<div class="row">
                       			<div class="col-sm-6">
                       			 	<label class="col-sm-3 control-label">医生姓名</label>
	                                <div class="col-sm-9">
[#--	                                    <input type="text" name="doctorId" class="form-control" maxlength="200" />--]
		                                <select id="doctorId" class="form-control {required:true}" name="doctorId" maxlength="200" required>
																			<option value="">请选择</option>
			                                [#list doctors as ds]
			                                <option value="${ds.id}">${ds.name}</option>
			                                [/#list]
																		</select>
	                                </div>
                       			</div>
							</div>
                        </div>
							<!--/row-->

                          <div class="form-group">
                       		<div class="row">
[#--                       			<div class="col-sm-6">--]
[#--                       			 	<label class="col-sm-3 control-label">日期对应的星期值</label>--]
[#--	                                <div class="col-sm-9">--]
[#--	                                    <input type="text" name="weekValue" class="form-control" maxlength="200" />--]
[#--	                                </div>--]
[#--                       			</div>--]
                       			<div class="col-sm-6">
                       			 	<label class="col-sm-3 control-label">值班日期</label>
	                                <div class="col-sm-9">
		                                <input type="text" id="work_date" name="workDate" class="form-control" placeholder="请选择日期" required="required"/>
	                                </div>
                       			</div>
							</div>
                        </div>
							<!--/row-->

                          <div class="form-group">
                       		<div class="row">
                       			<div class="col-sm-6">
                       			 	<label class="col-sm-3 control-label">值班时间段</label>
	                                <div class="col-sm-9">
[#--	                                    <input type="text" name="workTime" class="form-control" maxlength="200" />--]
		                                <select id="work_time" class="form-control {required:true}" name="workTime" maxlength="200">
																			<option value="">请选择</option>
			                                <option value="0">上午</option>
			                                <option value="1">下午</option>
		                                </select>
	                                </div>
                       			</div>
[#--                       			<div class="col-sm-6">--]
[#--                       			 	<label class="col-sm-3 control-label">放号</label>--]
[#--	                                <div class="col-sm-9">--]
[#--	                                    <input type="text" name="surplus" class="form-control" maxlength="200" />--]
[#--	                                </div>--]
[#--                       			</div>--]
							</div>
                        </div>
							<!--/row-->

[#--                          <div class="form-group">--]
[#--                       		<div class="row">--]
[#--                       			<div class="col-sm-6">--]
[#--                       			 	<label class="col-sm-3 control-label">已预约</label>--]
[#--	                                <div class="col-sm-9">--]
[#--	                                    <input type="text" name="subscribed" class="form-control" maxlength="200" />--]
[#--	                                </div>--]
[#--                       			</div>--]
[#--							</div>--]
[#--                        </div>--]
							<!--/row-->

                          <div class="form-group">
                       		<div class="row">
                       			<div class="col-sm-6">
                       			 	<label class="col-sm-3 control-label">时间间隔</label>
	                                <div class="col-sm-9">
	                                    <input type="number" name="gap" class="form-control" maxlength="200" required="required"/>
	                                </div>
                       			</div>
							</div>
                        </div>
							<!--/row-->

                        <div class="hr-line-dashed"></div>
	                    <div class="form-group">
	                        <div class="col-sm-12 col-sm-offset-10">
	                        	<button type="button" class="btn btn-default" onclick="window.history.back();">返回</button>
	                            <button class="btn btn-success" type="submit">保存内容</button>
	                        </div>
	                    </div>
	                    </form>
                  	</div>
                </div>
            </div>
        </div>
    </div>
	<!-- BEGIN Script -->
		[#include "/admin/include/script.ftl"]
	<!-- END Script -->
[#--    <script src="https://heerey525.github.io/layui-v2.4.3/layui/layui.js" charset="utf-8"></script>--]
    <script src="${base}/resources/js/plugins/layer/laydate/laydate.js"></script>
    <script>
        $(document).ready(function () {
        	[@flash_message /]
        	$(".chosen-select").chosen({width:"100%"});
        	$(".input-daterange").datepicker({keyboardNavigation:false,forceParse:false,autoclose:true});

        	$(".browserButton").browser({callback:function(url){
						$("#"+$(this).attr('for')).val(url);
					}});

    		  $(".input-group.date").datepicker({todayBtn:"linked",keyboardNavigation:false,forceParse:false,calendarWeeks:true,autoclose:true});
            $("#inputForm").validate({
            rules: {
              doctorId: {
                required: true
              },
              workDate: {
                required: true
              },
              workTime: {
                required: true
              },
              gap: {
                required: true,
				min: 0
              }
            },
            messages: {}
          });

        });
        // layui.use('laydate', function(){
        //   var laydate = layui.laydate;
          //执行一个laydate实例
          laydate.render({
            elem: '#work_date' //指定元素
          });
        // });



    </script>
</body>
</html>
